/*
 * @Author: atao
 * @Date: 2023-11-13 19:49:24
 * @LastEditTime: 2023-11-23 14:20:09
 * @FilePath: \yayun-web000\src\router\index.js
 */

/**
 * 创建一个实例
 */
import Router from "vue-router";
/**
 * Unknown custom element: <router-view> - did you register the component correctly?
 * 需要把Router插件中的路由组件注册到全局
 */
import Vue from "vue";
import routes from "./routes";
import interceptor from "./interceptor";
Vue.use(Router);

const router = new Router({
    //指定路由模式
    mode: 'history',
    routes: routes
});
router.beforeEach(interceptor);
export default router;